<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>add</title>
    <link th:href="@{/css/admin/addUser.css}" rel="stylesheet"/>
</head>
<body>
<div th:if="${errorMsg!=null}" class="form-container">
    <h1 th:text="${errorMsg}"></h1>
    <h2>3秒后重新加载<a href="/admin/addUser">此页面</a></h2>
</div>
<th:block th:insert="~{admin/header :: sidebar}"/>
<h2>添加用户</h2>
<form action="/admin/add" method="POST">

    <table>
        <tr>
            <td>用户名：</td>
            <td><input name="username" type="text"></td>
        </tr>
        <tr>
            <td>密码：</td>
            <td><input name="password" type="text"></td>
        </tr>
        <tr>
            <td>电话号码：</td>
            <td><input name="phonenumber" type="text"></td>
        </tr>
        <tr>
            <td>邮箱：</td>
            <td><input name="email" type="text"></td>
        </tr>
        <tr>
            <td>状态：</td>
            <td><input name="userstatus" type="text"></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <button type="submit">提交</button>
            </td>
        </tr>
    </table>

</form>
</body>
<script th:inline="javascript" th:if="${errorMsg!= null}">
    setTimeout(function () {
        window.location.href = "/admin/addUser";
    }, 3000);
</script>
</html>